import request from '@/utils/request'

// 创建存储方案信息
export function createPlan(data) {
  return request({
    url: '/system/plan/create',
    method: 'post',
    data: data
  })
}

// 更新存储方案信息
export function updatePlan(data) {
  return request({
    url: '/system/plan/update',
    method: 'put',
    data: data
  })
}

// 删除存储方案信息
export function deletePlan(id) {
  return request({
    url: '/system/plan/delete?id=' + id,
    method: 'delete'
  })
}

// 获得存储方案信息
export function getPlan(id) {
  return request({
    url: '/system/plan/get?id=' + id,
    method: 'get'
  })
}

// 获得存储方案信息分页
export function getPlanPage(params) {
  return request({
    url: '/system/plan/page',
    method: 'get',
    params
  })
}
// 导出存储方案信息 Excel
export function exportPlanExcel(params) {
  return request({
    url: '/system/plan/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}